package nl.zoidberg.calculon.util;


public class KingMoveBitmapGen {

	public static void main(String[] args) {
		for(int file = 0; file < 8; file++) {
			for(int rank = 0; rank < 8; rank++) {
				long bitmap = 0;
				if(rank < 7 && file < 7) {
					bitmap |= 1L<<((rank+1)<<3)<<(file+1);
				}
				if(rank < 7) {
					bitmap |= 1L<<((rank+1)<<3)<<(file);
				}
				if(rank < 7 && file > 0) {
					bitmap |= 1L<<((rank+1)<<3)<<(file-1);
				}
				if(file < 7) {
					bitmap |= 1L<<(rank<<3)<<(file+1);
				}
				if(file > 0) {
					bitmap |= 1L<<(rank<<3)<<(file-1);
				}
				if(rank > 0 && file < 7) {
					bitmap |= 1L<<((rank-1)<<3)<<(file+1);
				}
				if(rank > 0) {
					bitmap |= 1L<<((rank-1)<<3)<<(file);
				}
				if(rank > 0 && file > 0) {
					bitmap |= 1L<<((rank-1)<<3)<<(file-1);
				}
				System.out.println("\t\tkm2Bitmap[" + (rank<<3|file) + "] = " + bitmap + "L;");
				// " + BitBoard.toPrettyString(bitmap));
			}
		}
	}
}
